#!/usr/bin/python

class Rule:
  def __init__(self, attributes, result):
    self.attributes = attributes
    self.result = result
  
  def getDistance(self, rule):
    distance = 0
    for k, v in self.attributes.iteritems():
      if k in rule:
        if not rule[k] in v:
          distance = distance + 1

    return distance

# ------------------------
if __name__ == "__main__":
  pass

